package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.SLotteryStatisDayDao;
import com.xyz.domain.table.SLotteryStatisDay;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SLotteryStatisDayLogic {

    @Autowired
    private SLotteryStatisDayDao sLotteryStatisDayDao;

    public SLotteryStatisDay add(SLotteryStatisDay sLotteryStatisDay){
        return sLotteryStatisDayDao.insert(sLotteryStatisDay);
    }

    public Integer update(SLotteryStatisDay sLotteryStatisDay){
        return sLotteryStatisDayDao.update(sLotteryStatisDay);
    }

    public List<SLotteryStatisDay> list(SLotteryStatisDay sLotteryStatisDay, String orderBy){
        return sLotteryStatisDayDao.selectList(sLotteryStatisDay, orderBy);
    }

    public Integer delete(Integer key){
        return sLotteryStatisDayDao.delete(key);
    }

    public PageResponseModel<SLotteryStatisDay> pageInfo(SLotteryStatisDay sLotteryStatisDay, String orderBy, Integer pageNo, Integer pageSize){
        return sLotteryStatisDayDao.selectByPageNo(sLotteryStatisDay, orderBy, pageNo, pageSize);
    }

}